Hello, I'm getting an error when attempting to create the last column(dxl) was wondering what I'm overlooking; any help would be appreciated? Thank you. -Jim
string EvalCode = " EHcnck - Wed May 08 21:15:30 EDT 2013 |
Re: Eval_ (help needed) It would help if you told us what the problem is. At first glance it does not seem to me you need to do this with "eval_". But if you do, I point out that..
Thus, attr-DXL hard coded into eval_ code that is hard coded needs to be double-escaped. That is far too dificult for me to visualize so I cannot tell if you are actually doing that or not ... but it does not appear to me that you are doing that correctly. Perhaps assign your Attr-DXL to a variable, then print the contents of the variable and check it out. Another solution is to type in the Attr-DXL into a file, then have this script read the file and deploy it. -Louie |
Re: Eval_ (help needed) llandale - Thu May 09 11:03:10 EDT 2013 It would help if you told us what the problem is. At first glance it does not seem to me you need to do this with "eval_". But if you do, I point out that..
Thus, attr-DXL hard coded into eval_ code that is hard coded needs to be double-escaped. That is far too dificult for me to visualize so I cannot tell if you are actually doing that or not ... but it does not appear to me that you are doing that correctly. Perhaps assign your Attr-DXL to a variable, then print the contents of the variable and check it out. Another solution is to type in the Attr-DXL into a file, then have this script read the file and deploy it. -Louie Hello, I thought using "Column" had memory issues meaning not being released; that's why I'm trying to use eval_? Thank you. -Jim |
Re: Eval_ (help needed) EHcnck - Thu May 09 11:09:49 EDT 2013 Hello, I thought using "Column" had memory issues meaning not being released; that's why I'm trying to use eval_? Thank you. -Jim Are you creating 5K+ "Columns" in a single DXL? If not don't worry about it. I've got a script to copy Views and it creates LOTS of "Columns" in 1000 modules, and it runs fast enough. In any event, get it to work without "eval_", then add the extra levels of escaping and put it in eval_. -Louie |
Re: Eval_ (help needed) EHcnck - Thu May 09 11:09:49 EDT 2013 Hello, I thought using "Column" had memory issues meaning not being released; that's why I'm trying to use eval_? Thank you. -Jim I agree with Louie, don't worry about the "Column" leak unless it becomes a problem for you. It is a 'non-persistant' leak, so all is cleared up when the dxl ends. It is therefore of no real benifit to use eval_ in a script which does nothing before or after the eval_ call.
vs
Also, noError before eval_ will not prevent runtime errors in the eval code. You could do this instead if you want: string s​Error = eval_("noError();\n" EvalCode ";\nreturn_(lastError());") Adam |